package A;

public class Test_09 {
    public static void main(String[] args) {
        //定义2个长度为5的字符串数组arrA和arrB，arrA包含元素{"a","b","c","d","e"};
        // 遍历arrA中的所有元素并按逆序存储在数组arrB中，
        // 并按arrB下标增长的顺序在控制台打印输出arrB数组中所有元素，演示格式如下：
        String[] arrA = {"a", "b", "c", "d", "e"};
        String[] arrB = new String[arrA.length];
        for (int i = 0; i < arrA.length; i++) {
            arrB[arrA.length - 1 - i] = arrA[i];
        }
        System.out.println("arrB中的元素为：");
        for (String s : arrB) {
            System.out.print(s+" ");
        }
    }
}
